import React from 'react';
import { Grid } from 'antd-mobile'
import { Link } from 'react-router-dom'

const PanelItem = (props) => {
    return (
        <Grid
            data={props.data}
            hasLine={false}
            activeStyle={false}
            itemStyle={{ background: '#02283b' }}
            renderItem={dataItem => (
                <div>
                    <Link to={dataItem.link || '/'}>
                        <img src={dataItem.icon} className="messageIcon" alt={dataItem.text} />
                        <div style={{ color: "#fff" }} className="messageText">
                            <span>{dataItem.text}</span>
                        </div>
                    </Link>
                </div>
            )}
        ></Grid>
    );
}

export default PanelItem;